const router = require('express').Router()

const { getBannerList, getUserInfo } = require('../middleware/pages')

router.get('/index', getBannerList, getUserInfo, (req, res) => { res.render('index.html', { list: req.banner, nickname:req.nickname}) })
router.get('/login', (req, res) => { res.render('login.html') })
router.get('/register', (req, res) => res.render('register.html', {}))
router.get('/self', (req, res) => res.render('self.html', {}))
router.get('/rpwd', (req, res) => res.render('rpwd.html', {}))
router.get('/list', (req, res) => res.render('list.html', {}))
router.get('/cart', getUserInfo, (req, res) => res.render('cart.html', {}))

module.exports = router